package com.itheima.day05.consumer;


import com.itheima.day05.config.RabbitMQEmailConfig;
import com.itheima.day05.entity.User;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
public class SmsNotificationConsumer {

    @RabbitListener(queues = RabbitMQEmailConfig.SMS_QUEUE_NAME)
    public void handleSmsNotification(User user) {
        System.out.println("Sending SMS to: " + user.getEmail() + ", Message: Welcome, " + user.getUsername() + "!");
    }
}